package com.sxd.bill.common.item;

import com.sxd.bill.common.enums.LabelNameEnum;

import lombok.Data;

@Data
public class LabelItem implements Cloneable {
    private int startIndex;
    private int endIndex;
    private String labelEntity;
    private LabelNameEnum labelName;

    @Override
    public LabelItem clone() {
        try {
            LabelItem cloned = (LabelItem) super.clone();
            cloned.labelName = this.labelName; // 设置相同的枚举值
            return cloned;
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException("Clone not supported for LabelItem", e);
        }
    }
}
